<template>
  <div class="app-container">
<!--    <el-form v-model="queryParams" :inline="true" label-width="120px">-->
<!--      <el-form-item label="选择月份" prop="date">-->
<!--        <el-date-picker-->
<!--          size="small"-->
<!--          v-model="queryParams.date"-->
<!--          type="month"-->
<!--          :clearable="false"-->
<!--          placeholder="选择月">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--    </el-form>-->
    <div :style="'height:'+ height" style="min-height: 500px">
      <iframe :src="src"  style="width: 100%;height: 100%" />
    </div>
  </div>
</template>

<script>
import moment from "moment";
export default {
  name: "hourStatistics",
  data() {
    return {
      current: 1,
      queryParams: {
        date: new Date(),
        pageNum: 1,
        pageSize: 10,
      },
      height: document.documentElement.clientHeight  + "px;",
      id:'',
      rowId:'',
      sysDateTime:'',
      nickName:'',
      orderId:'',
    }
  },
  created() {
    this.id=this.$route.query.id
    this.rowId=this.$route.query.rowId
    this.sysDateTime=this.$route.query.sysDateTime
    this.nickName=this.$store.state.user.userInfo.nickName
    this.orderId=this.$route.query.orderId

  },
  computed: {
    src() {
      const date = moment().format('YYYY-MM')
      return  process.env.VUE_APP_BASE_API + `/jmreport/view/${this.id}?token=null&id=${this.rowId}&pan_num=${this.rowId}&business_num=${this.rowId}&sysDateTime=${this.sysDateTime}&order_num=${this.rowId}&order_id=${this.orderId}&nickName=${this.nickName}`
    }
  },

  mounted() {
    window.onresize = () =>  {
      // this.height = document.documentElement.clientHeight - 190 + "px;";
      // setTimeout(()=>{
      //   document.getElementsByClassName('vertical')
      //   console.log(document.getElementsByClassName('vertical'))
      // },1000)
    }
  }
}
</script>

<style scoped lang="scss">
.question {
  font-size: 14px;
  position: absolute;
  color: #ff7a45;
}
::v-deep .jm-sheet-scrollbar,.vertical{
  display: block !important;
}
</style>
